﻿using Nop.Web.Framework;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace SpotsHub.Gateway.Models.Customer
{
    public class CustomerTrackingModel
    {
        public CustomerTrackingModel()
        {
            TrackingPackages = new List<TrackingPackageModel>();
            TrackingDaysOptions = new List<SelectListItem>();
        }

        public IList<TrackingPackageModel> TrackingPackages { get; set; }

        public CustomerNavigationModel NavigationModel { get; set; }

        public int? TrackingDays { get; set; }
        public IList<SelectListItem> TrackingDaysOptions { get; set; }

        public DateTime? StartDate { get; set; }

        public DateTime? EndDate { get; set; }

        public string TrackingNumber { get; set; }

        public bool IsAuthenticated { get; set; }

        #region Nested classes

        public class TrackingPackageModel
        {
            public int Id { get; set; }
            public int ShipmentId { get; set; }
            public int OrderId { get; set; }

            public DateTime CreatedTime { get; set; }
            [NopResourceDisplayName("Logistics.Tracking.Createdon")]
            public string CreatedTimeStr { get; set; }

            public DateTime UpdateTime { get; set; }
            public string UpdateTimeStr { get; set; }

            public DateTime? PickupTime { get; set; }
            public string PickupTimeStr { get; set; }

            public DateTime? DeliveryTime { get; set; }
            public string DeliveryTimeStr { get; set; }

            public string PackageMeasurement { get; set; }

            public string Reference { get; set; }

            public string Status { get; set; }

            public string TrackingNumber { get; set; }

            public string PickUpAddress { get; set; }

            public string DeliveryAddress { get; set; }

            public string OrderBy { get; set; }
            [NopResourceDisplayName("Logistics.Tracking.ShippingLabel")]
            public string DownloadShippingLabelLink { get; set; }
            public string ShipmentDetailLink { get; set; }
        }

        #endregion
    }
}